<template>
  <div>
    <div class="topcom">
      <span
        class="iconfont icon-arrowRight-copy-copy"
        @click="$router.go(-1)"
      ></span>
      完整榜单
      <span class="iconfont icon-sousuo"></span>
    </div>

    <div class="combox">
      <div
        class="cshelfbox"
        v-for="(item, index) in comlist"
        :key="index"
        @click="
          $router.push({
            path: '/bookxq',
            query: { id: item.id, cover: item.cover },
          })
        "
      >
        <img :src="item.cover" class="shelfimg" />
        <div class="stext">
          <p class="shelfname">{{ item.title }}</p>
          <p class="shelfsped">{{ item.author }}</p>
          <p class="shelfupdata">{{ item.content }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { storeMerged } from "../../api/res";
export default {
  data() {
    return {
      comlist: "",
    };
  },
  created() {
    storeMerged().then((data) => {
      console.log(data.list);
      this.comlist = data.list;
    });
  },
};
</script>

<style lang="less">
.topcom {
  width: 100%;
  font-size: 25px;
  font-weight: bold;
  text-align: center;
  line-height: 50px;
  background-color: white;
  border-bottom: 1px solid gainsboro;
  .icon-arrowRight-copy-copy {
    font-size: 25px;
    float: left;
  }
  .icon-sousuo {
    font-size: 25px;
    float: right;
    // margin-left: -10px;
    margin-right: 10px;
  }
}
.combox {
  padding-bottom: 65px;
  margin-top: 20px;
  .cshelfbox {
    //   border: 1px solid black;
    margin-top: 10px;
    display: flex;
    .shelfimg {
      width: 80px;
      height: 100px;
      // border: 1px solid black;
      margin-left: 20px;
      // background-image: url(../assets/imag/01.jpg);
      // background-size: cover;
    }
    .stext {
      margin-left: 10px;
      margin-top: 7px;
      .shelfname {
        font-size: 18px;
        width: 220px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
      .shelfsped {
        font-size: 10px;
        color: #707070;
      }
      .shelfupdata {
        width: 200px;
        font-size: 10px;
        color: #707070;
        line-height: 25px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
  }
}
</style>